package com.gdzl.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by hboxs004 on 2018/3/6.
 */
@Controller
@RequestMapping(value = "/")
public class TestController {

    @RequestMapping(value = "/index", method = {RequestMethod.GET, RequestMethod.POST})
    public String index() {
        return "/index";
    }

    @RequestMapping(value = "/test/log", method = {RequestMethod.GET, RequestMethod.POST})
    public String test(Model model) {
        String author = "翻越冈多则拉大雪山";
        model.addAttribute("author", author);
        return "/test";
    }
}
